package com.king.study.bean;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanTest {

    private String name;
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        System.out.println(applicationContext.getBean("hello"));
    }

    @Bean
    public BeanTest hello(){
        return new BeanTest();
    }


}
